@isTest(SeeAllData=true)
private class WorkOrderPerformanceControllerTest {
    static testMethod void testMethod1() {
    	//Id ldcProfile = [Select Id From Profile Where Name ='工程部工程师' ].Id;

    	 User u1 = [select Id from User where Profile.Name = '工程部工程师'  and isActive = true limit 1];


        Account acc=new Account();
        acc.Name='Test1229J';
        insert acc;
 

        Case cas=new Case();
        cas.AccountId=acc.Id;
        insert cas;

        WorkOrder__c wo=new WorkOrder__c();
        wo.Case__c=cas.Id;
        wo.Account__c=acc.Id;
        wo.Status__c='处理中';
        wo.ProductLine__c = '生化';
        //wo.ManufactureInfo__c=p1.Id;
        wo.EvaluateServiceType__c = '安装/移机';
        wo.recordTypeId = Utils.getRecordTypeIdByDevNameAndObjName('InstallationOrder','WorkOrder__c');
        wo.WhetherToMakeASingle__c = '否';
        insert wo;

        WorkOrderTeam__c wt = new WorkOrderTeam__c();
        wt.User__c = u1.Id;
        wt.WorkOrder__c = wo.id;
        wt.IsSupport__c = true;
        insert wt;


        WorkOrderPerformanceController wp = new WorkOrderPerformanceController();
        wp.init();
        wp.woId = wo.Id;
        wp.init();
        wp.wo.ModuleNumber__c = 1;

        
        Set<String>prlines = new Set<String>{'生化','临检','其他'};

        System.Test.startTest();
         //wp.wo.ProductLine__c =prline;

                wp.save();
                wp.wo.EvaluateServiceType__c ='保养';
                wp.save();
                wp.wo.EvaluateServiceType__c ='服务';
                wp.save();
                wp.wo.EvaluateServiceType__c ='校准';
                wp.save();

                wp.wo.Case__r.ProductLine__c = '临检';
                wp.save();
        
       
    
        


    }
}